package com.app.mapper;

import com.app.entity.po.HuibenComment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 评论表 Mapper 接口
 */
public interface HuibenCommentMapper extends BaseMapper<HuibenComment> {

    /**
     * 根据绘本ID查询评论列表，按创建时间倒序排列
     * @param bookId 绘本ID
     * @return 评论列表
     */
    List<HuibenComment> selectByBookIdOrderByCreatedAt(@Param("bookId") Long bookId);
} 